package com.knowledge.graph.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.knowledge.graph.model.entity.NodeAndVideo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @description: TODO
 * @author jiwenlong
 * @date 2023/11/22 20:40
 * @version 1.0
 */
@Mapper
public interface NodeAndVideoMapper extends BaseMapper<NodeAndVideo> {

    @Select("select video_id from node_and_video where node_id = #{nodeID}")
    public int[] getVideoByNodeID(Integer nodeID);

    @Delete("delete from node_and_video where video_id = #{videoID}")
    public int deleteByVideoID(Integer videoID);
}
